{extend name="Layout/layout" /}
{block name="body_content"}
<div class="container text-page">
    <h1>会员登陆</h1>
    <div style="width:50%; margin: 20px auto;">
        <form class="form-horizontal" action="{:U('loginAction')}">
            <div class="form-group">
                <label class="col-sm-4 control-label">会员帐号：</label>
                <div class="col-sm-8">
                    <input type="text" name="user_name" class="form-control" placeholder="会员帐号" required="required">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-4 control-label">登录密码：</label>
                <div class="col-sm-8">
                    <input type="password" name="password" class="form-control" placeholder="登录密码" required="required">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-4 control-label">验证码：</label>
                <div class="col-sm-8 xsui-captcha-group">
                    <div class="input-group">
                        <input type="text" name="captcha" class="form-control" placeholder="验证码" required="required">
                        <span class="input-group-btn">
                            <img src="{:U('Captcha/index')}" alt="" />
                        </span>
                        <span class="input-group-btn">
                            <a href="#" class="btn btn-link">看不清楚，再换一张</a>
                        </span>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-offset-4">
                    <button type="submit" class="btn btn-danger">立即登陆</button>
                    <span style="font-size:13px">还没有帐号？立即 <a href="{:U('Signup/index')}">[注册]</a> !</span>
                </div>
            </div>
        </form>
    </div>
</div>
{/block}
{block name="body_foot"}
<script>
    $('.xsui-captcha-group a, .xsui-captcha-group img').click(function () {
        var $img = $('.xsui-captcha-group img');
        $img.attr('src', $img.attr('src'));
        return false;
    })
</script>
{/block}